<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Reckoning
Description: A two-column, fixed-width design for 1024x768 screen resolutions.
Version    : 1.0
Released   : 20090629

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Reckoning by Free CSS Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>

<h1>Listing User Settings</h1>

<table>
  <tr>
<!--
    <th>Box Manager |</th>
    <th>Load Box |</th>
    <th>Algorithm |</th>
    <th id="medium">Green Input</th>
-->
    <th id="medium">Consumption Preference |</th>
    <th id="medium">Utility Control Level </th>
    <th></th>
    <th></th>
  </tr>

<% @user_settings.each do |user_setting| %>
  <tr>
<!--    <td><%= user_setting.boxmanager_id %></td>
    <td><%= user_setting.loadbox_id %></td>
    <td><%= user_setting.algorithm_id %></td>
    <td id="medium"><%= user_setting.green_input %></td>
-->
    <td id="medium"><%= if user_setting.consumption_preference == 1
    	'Sell Green Power-Low Cost '
    elsif user_setting.consumption_preference == 2
    	'High Green Power Usage '
    elsif user_setting.consumption_preference == 3
    	'Moderate Green Power Usage '
    elsif user_setting.consumption_preference == 4
    	'Low Green Power Usage '
    elsif user_setting.consumption_preference == 6
    	'Sell Green Power-Moderate Cost '
    elsif user_setting.consumption_preference == 5
    	'Sell Green Power-High Cost '
    end %></td>
    
    <td id="medium"><%= if user_setting.utility_control_lvl == 1
  		'Full Control'
  	  elsif user_setting.utility_control_lvl == 2
  	  	'Control Over Priority 2 & 3'
  	  elsif user_setting.utility_control_lvl == 3
  	  	'Control Over Priority 3'
  	  elsif user_setting.utility_control_lvl == 4
  	  	'No Control'
  	  end %></td>
    <td id="medium"><%= link_to 'Show', user_setting %></td>
    <td id="medium"><%= link_to 'Edit', edit_user_setting_path(user_setting) %></td>
    <td id="medium"><%= link_to 'Destroy', user_setting, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New User Setting', new_user_setting_path %><br /><br /><br /><br />
<table>
<tr>
	<td>User Settings</td>
	<td><%= link_to 'Utility Settings', utility_settings_path %></td>
	<td><%= link_to 'Outlet Statuses', outlet_statuses_path %></td>
</tr>
</table>

</body>
</html>
